<?php

namespace App\Modules\Home\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * Class Area 地址
 * @package App\Modules\Task\Models
 */
class Area extends Model
{
    protected $table = 'area';

    protected $fillable = ['id', 'parent_id', 'name', 'short_name', 'longitude', 'latitude', 'level', 'sort', 'status'];

    /**
     * 地址列表
     */
    static function getList($level)
    {
        return self::where('level','<',$level)->orderBy('sort')->get()->toArray();
    }

}